import 'package:car_map/page/res/gaps.dart';
import 'package:car_map/page/routers/fluro_navigator.dart';
import 'package:car_map/widget/load_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'coffee_router.dart';

///咖啡item
class WidgetCoffeeListItem extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return InkWell(
      onTap: (){
        NavigatorUtils.push(context, CoffeeRouter.coffeeDetailsPage,
            replace: false);
      },
      child: Container(
        margin: EdgeInsets.only(bottom: 10.0),
        height: ScreenUtil().setHeight(200.0),
        child: Row(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: <Widget>[
            Container(
              width: ScreenUtil().setWidth(180.0),
              height: ScreenUtil().setHeight(190.0),
              child: ClipRRect(
                borderRadius: BorderRadius.all(Radius.circular(5.0)),
                child: LoadImage(
                  'https://s2.luckincoffeecdn.com/luckywebrm/images/pimg/tea/product/product_wheel_tea_1-1.jpg',
                  fit: BoxFit.cover,
                ),
              ),
            ),
            Container(
              margin: EdgeInsets.only(left: 15.0),
              width: ScreenUtil().setWidth(490),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: <Widget>[
                  Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: <Widget>[
                      Text('西柚芝士茉香茶'),
                      Text('Grapefruit Cheese Moss Tea'),
                      Gaps.vGap10,
                      Row(
                        children: <Widget>[
                          Text(
                            '￥15.70',
                            style: TextStyle(color: Colors.pinkAccent),
                          ),
                          Text(
                            '27.00',
                            style: TextStyle(
                                color: Colors.black45,
                                decoration: TextDecoration.lineThrough),
                          )
                        ],
                      )
                    ],
                  ),
                  Container(
                    child: Icon(Icons.more_vert, color: Colors.black45),
                  )
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}
